﻿using SD.Infrastructure.EntityBase;
using System;

namespace SlamDunk.MES.Domain.Entities.ResourceContext
{
    /// <summary>
    /// 班组成员
    /// </summary>
    public class TeamMember : PlainEntity, ISortable
    {
        #region # 构造器

        #region 00.无参构造器
        /// <summary>
        /// 无参构造器
        /// </summary>
        protected TeamMember() { }
        #endregion

        #region 01.创建班组成员构造器
        /// <summary>
        /// 创建班组成员构造器
        /// </summary>
        /// <param name="personId">人员Id</param>
        /// <param name="sort">排序</param>
        /// <param name="description">描述</param>
        public TeamMember(Guid personId, int sort, string description)
            : this()
        {
            this.PersonId = personId;
            this.Sort = sort;
            this.Description = description;
        }
        #endregion

        #endregion

        #region # 属性

        #region 人员Id —— Guid PersonId
        /// <summary>
        /// 人员Id
        /// </summary>
        public Guid PersonId { get; private set; }
        #endregion

        #region 排序 —— int Sort
        /// <summary>
        /// 排序
        /// </summary>
        public int Sort { get; private set; }
        #endregion

        #region 描述 —— string Description
        /// <summary>
        /// 描述
        /// </summary>
        public string Description { get; private set; }
        #endregion

        #region 导航属性 - 班组 —— Team Team
        /// <summary>
        /// 导航属性 - 班组
        /// </summary>
        public virtual Team Team { get; internal set; }
        #endregion

        #endregion
    }
}
